# -*- coding: utf-8 -*-
"""
@Project: base_python
@File: scrapetest.py
@Author: PC
@Date: 2025/04/29
@Description: 
"""

from urllib.request import urlopen
from bs4 import BeautifulSoup
import re


html = urlopen('http://www.pythonscraping.com/pages/page3.html')
bs = BeautifulSoup(html, 'html.parser')
# images = bs.find_all(lambda tag: tag.get_text() == 'Or maybe he\'s only resting?')
images = bs.find_all(lambda tag: tag.get_text() == '8 entire dolls per set! Octuple the presents!')
print(images)